package com.lune.blog.api.feign;


import com.lune.blog.api.config.FeignInterceptor;
import com.lune.blog.api.factory.UserFallbackFactory;
import com.lune.blog.base.domain.LoginUser;
import com.lune.blog.base.result.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author yanjizhw@163.com
 * @date 2021/10/12 11:29
 * @since 1.0.0
 * 描述
 */
@FeignClient("lune-system")
public interface UserServiceFeign {

    /**
     * 根据用户名查询用户信息
     * @param username 用户名
     * @return 用户信息
     */
    @GetMapping("/user/info/{username}")
    CommonResult<LoginUser> info(@PathVariable("username") String username);
}
